//
//  HRZCartService.h
//  EMarket
//
//  Created by 石头 on 2018/7/17.
//  Copyright © 2018 好日子. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HRZBaseService.h"

@class HRZAddShopCartModel;
@class HRZUpdateNumberModel;
@class HRZDeleteCarModel;
@class HRZGetShopCarListModel;
@class HRZCartGoodsDetailModel;

@interface HRZCartService : HRZBaseService


/**
 添加商品到购物车

 @param model 商品
 @param success 成功
 @param failure 失败
 */
+ (void)addGoodsToCartWith:(HRZAddShopCartModel *)model
                   success:(void (^)(NSString *suc))success
                   failure:(void (^)(NSString *error))failure;

/**
 获取购物车中所有商品

 @param model 门店
 @param success 商品数组
 @param failure 失败
 */
+ (void)getAllCartGoodsWithCurrentUserId:(HRZGetShopCarListModel *)model
                                 success:(void (^)(NSArray <HRZCartGoodsDetailModel *>*goodses))success
                                 failure:(void (^)(NSString *error))failure;


/**
 更新购物车商品数量

 @param model 更新商品
 @param success 成功
 @param failure 失败
 */
+ (void)updateCartGoodsNunberWith:(HRZUpdateNumberModel *)model
                          success:(void (^)(NSString *success))success
                          failure:(void (^)(NSString *error))failure;


/**
 删除购物车中的商品

 @param model 商品
 @param success 成功
 @param failure 失败
 */
+ (void)deletedGoodsFromCart:(HRZDeleteCarModel *)model
                     success:(void (^)(NSString *success))success
                     failure:(void (^)(NSString *error))failure;

@end
